<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <!-- <meta name="viewport" content="width=device-width,initial-scale=1.0"> -->
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <!-- <link rel="stylesheet" href="./index.css"> -->
  <link rel="icon" href="<%= BASE_URL %>favicon.ico">
  <link rel="stylesheet" href="../src/assets/iconfont/iconfont.css">
  <title><%= htmlWebpackPlugin.options.title %></title>
</head>
<style>
  * {
    margin: 0;
    padding: 0;
    list-style: none;
    text-decoration: none;
    /* color: #000; */
  }
</style>

<body>
  <noscript>
    <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
      Please enable it to continue.</strong>
  </noscript>
  <div id="app"></div>
  <!-- built files will be auto injected -->
</body>

</html>
<script>
  var deviceWidth
  setHtmlFontSize()

  if (window.addEventListener) {
    window.addEventListener('resize', function () {
      setHtmlFontSize()
    }, false)
  }
  function setHtmlFontSize() {
    // 1920是设计稿的宽度，当大于1920时采用1920宽度，比例也是除以19.20
    deviceWidth = document.documentElement.clientWidth > 1920 ? 1920 : document.documentElement.clientWidth
    document.getElementsByTagName('html')[0].style.cssText = 'font-size:' + deviceWidth / 19.20 + 'px'
  }
</script>